<!--
 * @Author: your name
 * @Date: 2020-12-09 14:42:27
 * @LastEditTime: 2020-12-21 16:06:29
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \sende_nuxt\pages\personalCenter\accountDashboard\billingAgreements\index.vue
-->
<template>
  <div class="billingAgreements">
    <el-alert
      class="mb10"
      :title="$t('There are no billing agreements yet.')"
      show-icon
      type="warning">
    </el-alert>
    <h3 class="size16 b mb10">{{$t('NEW BILLING AGREEMENT')}}</h3>
    <p class="size12 text_c mb20">{{$t('You will be redirected to the payment system website.')}}</p>
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
      <el-form-item prop="billings">
        <el-select class="s12" v-model="ruleForm.billings" :placeholder="$t('Please Select')">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button  type="info" plain @click="submitForm('ruleForm')">{{$t('CREATE')}}</el-button>
      </el-form-item>
    </el-form>
    <back class="mb30" />
  </div>
</template>

<script>
import Back from '~/components/personalCenter/Back';
export default {
  data() {
    return {
      options: [{
        value: '1',
        label: 'PayPal Billing Agreement'
      }],
      ruleForm: {
        billings: ''
      },
      rules: {
        billings: [
          { required: true, message: this.$t('Please select activity area'), trigger: 'change' }
        ]
      }
    }
  },
  components: {
    Back
  },
  methods: {
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          console.log('ruleForm :>> ', this.ruleForm);
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
  }
}
</script>

<style>

</style>